<template>
 <button @click="$emit('add',num+1)">click - {{ props.num }}</button> 
 <div>{{props.msg}}</div>
</template>
<script setup>
import {defineProps,defineEmits} from 'vue'

const props = defineProps({
    num:Number,
    msg:String
});
const emit = defineEmits(['add']);

// const{num} = props;

console.log(props.num);

</script>

    